/*
 * PhysicalObject.cpp
 *
 *  Created on: 05.06.2012
 *      Author: sebastian
 */

#include "PhysicalObject.h"

#include "../../utils/utils.h"
#include "../../utils/Namable.h"

/**
 * new created physical objects are set Active by Standard.
 */
PhysicalObject::PhysicalObject() {
	setActive();
	id_ = Namable::getUniqueId();
}

PhysicalObject::PhysicalObject(Vec where) {
	PhysicalObject();
	pos_ = where;
}

bool PhysicalObject::getIsSolid() const
{
    return isSolid_;
}

Vec PhysicalObject::getPos() const
{
    return pos_;
}

Meter PhysicalObject::getRadius() const
{
    return radius_;
}

Kelvin PhysicalObject::getTemperature() const
{
    return temperature_;
}

Vec PhysicalObject::getDPos() const
{
    return dPos_;
}

void PhysicalObject::setIsSolid(bool isSolid_)
{
    this->isSolid_ = isSolid_;
}

void PhysicalObject::setPos(Vec pos_)
{
    this->pos_ = pos_;
}

void PhysicalObject::setRadius(Meter radius_)
{
    this->radius_ = radius_;
}

void PhysicalObject::setTemperature(Kelvin temperature_)
{
    this->temperature_ = temperature_;
}

void PhysicalObject::setDPos(Vec velocity_)
{
    this->dPos_ = velocity_;
}

void PhysicalObject::calculateNextPos() {
	pos_ += dPos_;
}

Kilogram PhysicalObject::getMass() const
{
   return mass_;
}

void PhysicalObject::setMass(Kilogram mass_)
{
   this->mass_ = mass_;
}

void PhysicalObject::setIsActive(bool b) {
	isActive_ = b;
}

bool PhysicalObject::getIsActive() const {
	return isActive_;
}

void PhysicalObject::setActive() {
	setIsActive(true);
}

int PhysicalObject::getpId() const {
	return id_;
}
